import API from "@/network/request"

export default {
  /**
   * 查询自己的App
   * @param {*} data
   */
  getOwnApp(data) {
    return API({
      url: 'app/queryOwnApp',
      method: 'POST',
      data
    })
  },

  /**
   * 查询App
   * @param {*} data
   */
  getAppQuery(data) {
    return API({
      url: '/app/queryApp',
      method: 'POST',
      data
    })
  },

  /**
   * 新增App
   * @param {*} data
   */
  getAppAdd(data) {
    return API({
      url: '/app/addApp',
      method: 'POST',
      data
    })
  },

  /**
   * 编辑App
   * @param {*} data
   */
  getAppUpd(data) {
    return API({
      url: '/app/updateApp',
      method: 'POST',
      data
    })
  },

  /**
   * 禁用启用App
   * @param {*} data
   */
  getAppBan(data) {
    return API({
      url: '/app/banApp',
      method: 'POST',
      data
    })
  },

  /**
   * 查询任务
   * @param {*} data
   */
  getTaskQuery(data) {
    return API({
      url: 'app/queryTaskList',
      method: 'POST',
      data
    })
  },

  /**
   * 添加任务
   * @param {*} data
   */
  getTaskAdd(data) {
    return API({
      url: '/app/addTask',
      method: 'POST',
      data
    })
  },

  /**
   * 编辑任务
   * @param {*} data
   */
  getTaskUpd(data) {
    return API({
      url: '/app/updateTask',
      method: 'POST',
      data
    })
  },

  /**
 * 添加行业
 * @param {*} data
 */
  getTradeAdd(data) {
    return API({
      url: '/industry/addIndustry',
      method: 'POST',
      data
    })
  },

  /**
  * 查询行业
  * @param {*} data
  */
  getTradeQuery(data) {
    return API({
      url: '/industry/queryIndustry',
      method: 'POST',
      data
    })
  },

  /**
   * 修改行业
   * @param {*} data
   */
  getTradeUpd(data) {
    return API({
      url: '/industry/updateIndustry',
      method: 'POST',
      data
    })
  },

  /**
   * @description: 查询连续任务列表
   * @author: eaglehuang720@foxmail.com
   * @param {*} data
   * @date: 2021/5/8
   */
  getAutoMission(data) {
    return API({
      url: 'app/queryContinuousTask',
      method: 'POST',
      data
    })
  },

  /**
   * @description: 查询app
   * @author: eaglehuang720@foxmail.com
   * @param {*} data
   * @date: 2021/5/8
   */
  getAppAndMissionList(data) {
    return API({
      url: 'app/queryAppAndTask',
      method: 'POST',
      data
    })
  },
  delContinuousTask(data) {
  return API({
    url: 'app/delContinuousTask',
    method: 'POST',
    data
  })
  },

  /**
   * @description: 查询app下已有独立任务
   * @author: eaglehuang720@foxmail.com
   * @param {*} data
   * @date: 2021/5/10
   */
  getMissionListFromApp(data) {
    return API({
      url: 'app/queryTaskByAppId',
      method: 'POST',
      data
    })
  },

  /**
   * @description: 新增连续任务
   * @author: eaglehuang720@foxmail.com
   * @param {*} data
   * @date: 2021/5/8
   */
  getAutoMissionAdd(data) {
    return API({
      url: 'app/addContinuousTask',
      method: 'POST',
      data
    })
  },

  /**
   * @description: 查询特定连续任务
   * @author: eaglehuang720@foxmail.com
   * @param {*} data
   * @date: 2021/5/8
   */
  getOneAutoMission(data) {
    return API({
      url: 'app/queryOneContinuousTask',
      method: 'POST',
      data
    })
  },

  /**
   * @description: 修改连续任务
   * @author: eaglehuang720@foxmail.com
   * @param {*} data
   * @date: 2021/5/8
   */
  getAutoMissionUpd(data) {
    return API({
      url: 'app/updateContinuousTask',
      method: 'POST',
      data
    })
  },

  /**
   * @description: 修改连续任务
   * @author: eaglehuang720@foxmail.com
   * @param {*} data
   * @date: 2021/5/8
   */
  getAutoMissionBan(data) {
    return API({
      url: 'app/banContinuousTask',
      method: 'POST',
      data
    })
  },

  // 工单查询
  queryAllWorkOder(data) {
    return API({
      url: 'http://qk-api.aike.info/work/workorder/queryAllWorkOrder',
      method: 'POST',
      data
    })
  },

  //新增工作室
  addStudio(data) {
    return API({
      url: 'http://qk-api.aike.info/work/workorder/addStudio',
      method: 'POST',
      data
    })
  },

  //分页查询工作室
  queryStudio(data) {
    return API({
      url: 'http://qk-api.aike.info/work/workorder/queryStudio',
      method: 'POST',
      data
    })
  },

  //分配工单查询
  queryDistributeWorkOrder(data) {
    return API({
      url: 'http://qk-api.aike.info/work/workorder/queryDistributeWorkOrder',
      method: 'POST',
      data
    })
  },

  //分配工作室
  distributeStudio(data) {
    return API({
      url: 'http://qk-api.aike.info/work/workorder/distributeStudio',
      method: 'POST',
      data
    })
  },

  //分配
  distribute(data) {
    return API({
      url: 'http://qk-api.aike.info/work/workorder/distribute',
      method: 'POST',
      data
    })
  },

  //分配详情
  queryDistributeStudio(data) {
    return API({
      url: 'http://qk-api.aike.info/work/workorder/queryDistributeStudio',
      method: 'POST',
      data
    })
  },

  //取消分配
  cancelDistribute(data) {
    return API({
      url: 'http://qk-api.aike.info/work/workorder/cancelDistribute',
      method: 'POST',
      data
    })
  },

  // 工单详情
  getWorkAccountInfo (data) {
    return API({
      url: 'http://qk-api.aike.info/work/workorder/getWorkAccountInfo',
      method: 'POST',
      data
    })
  },

  // organ/queryAllWords
  queryAllWords (data) {
    return API({
      url: '/organ/queryAllWords',
      method: 'POST',
      data
    })
  },

  // 重置工作受帐户密码
  resetPassword (data) {
    return API({
      url: 'http://qk-api.aike.info/work/workorder/init/pwd',
      method: 'POST',
      data
    })
  },
}
